﻿using System;
using System.ComponentModel;
using System.Web.UI;

using CSLive.LiveMaps;

namespace CSLive.Controls
{
    public class MapPath
    {
        private Color fill = null;
        private MapPointCollection mappoints;
        private string description = "";
        private string title = "";
        private Color stroke = null;

        [Bindable( true )]
        [Localizable( true )]
        public Color Fill
        {
            get { return fill; }
            set { fill = value; }
        }

        [Bindable( true )]
        [DefaultValue( "200, 0, 200, 10" )]
        [Localizable( true )]
        public Color Stroke
        {
            get { return stroke ?? Color.Parse( 200, 200, 0, 10 ); }
            set { stroke = value; }
        }

        [Browsable( false )]
        [DefaultValue( null )]
        [PersistenceMode( PersistenceMode.InnerProperty )]
        public virtual MapPointCollection MapPoints
        {
            get { return mappoints ?? new MapPointCollection(); }
            set { mappoints = value; }
        }

        [Bindable(true)]
        [DefaultValue("")]
        [Localizable(true)]
        public string Title
        {
            get { return string.IsNullOrEmpty(title) ? "" : title; }
            set { title = value; }
        }

        [Browsable(false)]
        [DefaultValue("")]
        [Localizable(true)]
        [PersistenceMode(PersistenceMode.InnerProperty)]
        public string Description
        {
            get { return string.IsNullOrEmpty(description) ? "" : description; }
            set { description = value; }
        }
    }
}